﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RHFrameWork
{
    public enum enumProcessResult
    {
        未实现方法,
        未处理,
        处理成功,
        处理失败,
    }

    public class ProcessResult
    {
        private ProcessResult(enumProcessResult id, string msg, string pName)
        {
            this.ID = id;
            this.MSG = msg;
            this.PageProcessName = pName;
        }

        public enumProcessResult ID { get; set; }
        public string MSG { get; set; }
        public string PageProcessName { get; set; }

        public static ProcessResult Get(enumProcessResult pr, object pp)
        {
            return new ProcessResult(pr, pr.ToString(), pp.GetType().FullName);
        }

        public static void Out(ProcessResult pr)
        {
            Console.WriteLine(pr.PageProcessName + " --  进行处理");
            Console.WriteLine(pr.ID + ":" + pr.MSG);
        }
    }
}
